function getXMLDocument() {
	var xDoc = null;
	if (document.implementation && document.implementation.createDocumnet) {
		xDoc = document.implementation.createDocument("", "", null); // FF,
		// Safari
	} else if (typeof ActiveXObject != "undefined") {
		var msXmlAx = null;
		try {
			msXmlAx = new ActiveXObject("Msxml2.DOMDocument"); // new IE
		} catch (e) {
			msXmlAx = new ActiveXObject("Msxml.DOMDocument"); // old IE
		}
		xDoc = msXmlAx;
	}

	if (xDoc == null || typeof xDoc.load == "undefined") {
		xDoc = null;
	}
	return xDoc;
}

function getXMLHTTPRequest() {
	var xRequest = null;
	if (window.XMLHttpRequest) {
		xRequest = new XMLHttpRequest();// FF
	} else if (typeof ActiveXObject != "undefined") {
		xRequest = new ActiveXObject("Microsoft.XMLHTTP"); // IE
	} else {
		// xRequest = new ActiveXObject("Msxml2.XMLHTTP");
	}
	return xRequest;
}

function createRequest() {
	try {
		request = new XMLHttpRequest();
	} catch (trymicrosoft) {
		try {
			request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (othermicrosoft) {
			try {
				request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (failed) {
				request = null;
			}
		}
	}

	if (request == null)
		alert("Error creating request object!");
}